const dayjs = require("dayjs")
const mongoose = require("../../../db/db");
const { randomUUID } = require("crypto");
const { version } = require("os");

/**
 * @description 管理系统 菜单模型
 */
const Schema = mongoose.Schema({
    id: {
        type: String,
    },
    //创建日期
    createDate: {
        type: Number,
    },
    //父ID
    parentId: {
        type: String,
        require: true
    },
    //菜单名称
    menuName: {
        type: String,
        require: true
    },
    //菜单类型
    menuType: {
        type: String,
        require: true
    },
    //菜单图标
    menuIcon: {
        type: String,
    },
    //路由路径
    routerPath: {
        type: String,
        require: true
    },
    //排序
    sort: {
        type: Number,
    },
    //组件名称
    componentName: {
        type: String,
    },
    //组件路径
    componentPath: {
        type: String,
        require: true
    },
    //权限标识
    permissionMark: {
        type: String,
    },
    //激活菜单id 通常用于详情页面
    activeMenuId: {
        type: String,
    },
    visible: {
        type: Boolean
    },
    //状态
    status: {
        type: String,
        default: "1"
    },
    visible: {
        type: Boolean,
        default: true
    }
},{
    versionKey: false
})
const MAIN_TAB_MENU = mongoose.model("MAIN_TAB_MENU", Schema);
module.exports = MAIN_TAB_MENU;